﻿using DTcms.Core.Web.Filters;
using Microsoft.AspNetCore.Mvc;

namespace DTcms.Core.Web.Controllers
{
    [TempleteFilter]
    [ApiExplorerSettings(IgnoreApi = true)]
    public class ArticleController : Controller
    {
        /// <summary>
        /// 频道首页
        /// </summary>
        [Route("Article/{channelName}")]
        public IActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 频道列表页
        /// </summary>
        [Route("Article/{channelName}/List/{id?}")]
        public IActionResult List([FromRoute] int id)
        {
            return View(id);
        }

        /// <summary>
        /// 频道详情页
        /// </summary>
        [Route("Article/{channelName}/Show/{id}")]
        public IActionResult Show([FromRoute] int id)
        {
            return View(id);
        }

        /// <summary>
        /// 频道详情页(标识)
        /// </summary>
        [Route("Article/{channelName}/Detail/{callIndex}")]
        public IActionResult Detail([FromRoute] string callIndex)
        {
            return View("Detail", callIndex);
        }
    }
}
